<!DOCTYPE html>
<html>
    <head>
        <asset:stylesheet src="layui/css/layui.css" charset="gb2312"/>
    </head>
    <body>
            <table class="layui-hide" id="test" lay-filter="test"></table>

%{--
            <table class="layui-table" lay-data="{url:'list'}">
                <thead>
                <tr>
                    <th lay-data="{type:'checkbox'}">ID</th>
                    <th lay-data="{field:'id', sort: true}">ID</th>
                    <th lay-data="{field:'username'}">用户名</th>
                    <th lay-data="{field:'email', sort: true}">Email</th>
                    <th lay-data="{field:'enabled'}">激活</th>
                    <th lay-data="{field:'accountLocked', sort: true}">账号被锁定</th>
                    <th lay-data="{field:'accountExpired', sort: true }">账号过期</th>
                </tr>
                </thead>
            </table>
--}%

    <asset:javascript src="layui/layui.js" charset="gb2312"/>
    <script>
        layui.use('table', function(){
            var laydate = layui.laydate //日期
                ,laypage = layui.laypage //分页
                ,layer = layui.layer //弹层
                ,table = layui.table //表格
                ,carousel = layui.carousel //轮播
                ,upload = layui.upload //上传
                ,element = layui.element //元素操作
                ,slider = layui.slider //滑块

            table.render({
                elem: '#test'
                ,url:'list'
                ,title: '用户表'
                ,page: true //开启分页
                ,toolbar: 'default' //开启工具栏，此处显示默认图标，可以自定义模板，详见文档
                ,cols: [[
                    {field:'id', title: 'ID', sort: true }
                    ,{field:'username', title: '用户名'}
                    ,{field:'email', title: 'email', sort: true}
                    ,{field:'enabled', title: '激活'}
                    ,{field:'accountLocked', title: '账号被锁定'}
                    ,{field:'accountExpired', title: '账号过期', sort: true}
                    ,{field:'passwordExpired', title: '密码过期', sort: true}
                ]]
            });
        });
    </script>

    </body>
</html>